package com.mqy;

import com.mqy.mybatis.mapper.NongChangMapper;
import com.mqy.mybatis.pojo.TbNongchuang;
import com.mqy.mybatis.utils.MyBatisUtil;
import org.junit.Test;

/**
 * @author 13159 //作者
 * @version V1.0 //版本
 * @Project 2022.3.2MyBatis
 * @Package com.mqy
 * @Description:
 * @Date 2022/3/2 15:21//日期
 * @Motto:放下杂念,只为迎接明天更好的自己
 */

public class testUtils {
    @Test
    public void testUtils() {
        /*UserMapper userMapper = MyBatisUtil.getMapper(UserMapper.class);
        TbUser tbUser = new TbUser();
        tbUser.setUsername("xiaotian");
        tbUser.setPassword("wenroushanliangdafang");
        tbUser.setEmail("dasdasdasd@adasd.com");
        tbUser.setRole(1L);
        tbUser.setGender("男");
        tbUser.setCode("dasdasdasda");
        tbUser.setFlag(1L);
        userMapper.addUser(tbUser);
        //MyBatisUtil.commit();*/

        NongChangMapper nongchuang = MyBatisUtil.getMapper(NongChangMapper.class);
        TbNongchuang byId = nongchuang.findById(1L);
        System.err.println(byId);
    }
}
